function aa(a: number, b: number) {
	return a + b
}
const e = aa(1, 2332)
console.log(e)
const b = 3
export const d = 34
import { f as ff } from './app'
console.log(ff)
const obj: {
	name: string,
	age?: number,
	// [prop:string]:string
} = { name: 'xiaoming', age: 13 }
console.log(obj)
obj.age = 34
abstract class Obj {
	abstract say(): void;
	changeF(): void { };
}
class Animal extends Obj {
	name: string;
	age: number;
	constructor(name: string, age: number) {
		super();
		this.name = name;
		this.age = age;
	}
	// changeF: void {

	// }
	say(): void {
		console.log('this is animal')
	}
	static featureA: string = 'animal';
	protected static changeFeature() {

	}
}
// Animal.changeFeature()
class Cat extends Animal {
	readonly feature: string;
	constructor(name: string, age: number, feature: string) {
		super(name, age);
		this.feature = feature
	}
	say(): string {
		console.log('this is cat', Animal.featureA)
		this.say()
		return Animal.featureA
	}
	run = () => {

		console.log(this)
	}
}
let C = new Cat('wangcai', 34, 'little')
// C.say()
console.log(new Cat('wangcai', 34, 'little').run(), Cat.featureA, Animal.featureA, new Animal('animal', 23))
type feature = {
	gender: string,
	age: number,
	name: string
}
const objF: feature = {
	gender: 'female',
	age: 18,
	name: 'minmin'
}
interface fA {

}
let d2 = 23
console.log(typeof d2, typeof typeof d2)
// type ty=number| string |null
// let fa :ty =null
// let z:number=fa*2
const aaa: (aa: number, bb: number) => number = (a, b) => {
	return a - b
}
let person: { age: number, name: string } = { age: 18, name: 'xiaoming2' }
let d1 = { x: 3, y: 4 }
let d22: typeof d1 = { x: 5, y: 7 }
function id<T>(n: T): T {
	return n
}
const ccc = id(100)
function propFun<T extends keyof K, K>(obj: K, prop: T,ele?:string) {
	if (typeof obj[prop] == 'function') {
		return obj[prop](ele)
	}
	return obj[prop]
}
propFun({ name: 'xiaom', age: 18 }, 'name')
type acg =keyof 'avg'
type aaaa= keyof 123
const aa1a = propFun('123', 'lastIndexOf','3')
console.log('aa1a',aa1a)
let t = { name: 'xiaom', age: 18 }
type tKtyp = typeof t
type tProp = keyof tKtyp
let aaa1 = [1, 2, 3]
type aaa1T = typeof aaa1
// let dd:tKtyp={}
// console.log( tKtyp)
type ILength= {
	length: number,
	age: number
}
type ccc= Pick<ILength,'age'>
type PartialIlen =Partial<ILength>
let a:PartialIlen={}
type MyPartial<T>={
	[key in keyof T]?:T[key];
}
function getLength<K extends ILength>(a: K) {
	return a.length
}
console.log(getLength({ age: 18, length: 3, name: 13 }), typeof getLength)
type dvd=Record<'id'|'name',string>
